/*  MenuPlanner - helps you to plan your menu schedule and get your shoppinmg list
    Copyright (C) 2012  Jozsef Jantek

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * base_frame.java
 *
 * Created on Feb 26, 2012, 9:01:17 PM
 */

package menu;

import java.sql.*;
import java.util.*;
import javax.swing.*;

public class base_frame extends javax.swing.JFrame {
    
    Connection conn = null;
    
    /** Creates new form base_frame */
    public base_frame() {
        initComponents();
        this.setTitle("MenuPlanner");
        this.setLocation(680, 200);
        
        initDBConn();
        
        initScheCombo();

        initMealCombo();
        initMealIngs();
        course.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Előétel", "Főétel", "Köret", "Desszert" }));
        
        initIngsCombo(ing_c);
        ing_u.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "db", "kg", "liter" }));
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        main_int = new javax.swing.JTabbedPane();
        sched = new javax.swing.JPanel();
        year = new javax.swing.JComboBox();
        month = new javax.swing.JComboBox();
        day = new javax.swing.JComboBox();
        date_t = new javax.swing.JLabel();
        appe_t = new javax.swing.JLabel();
        appe = new javax.swing.JComboBox();
        main_t = new javax.swing.JLabel();
        main = new javax.swing.JComboBox();
        dres_t = new javax.swing.JLabel();
        dres = new javax.swing.JComboBox();
        dess_t = new javax.swing.JLabel();
        dess = new javax.swing.JComboBox();
        set_menu = new javax.swing.JButton();
        del_menu = new javax.swing.JButton();
        meals = new javax.swing.JPanel();
        course = new javax.swing.JComboBox();
        course_t = new javax.swing.JLabel();
        meal = new javax.swing.JComboBox();
        meal_t = new javax.swing.JLabel();
        ings_t = new javax.swing.JLabel();
        ing1 = new javax.swing.JComboBox();
        ing2 = new javax.swing.JComboBox();
        ing3 = new javax.swing.JComboBox();
        ing4 = new javax.swing.JComboBox();
        ing5 = new javax.swing.JComboBox();
        ing6 = new javax.swing.JComboBox();
        ing7 = new javax.swing.JComboBox();
        ing8 = new javax.swing.JComboBox();
        ing_u1 = new javax.swing.JTextField();
        ing_u2 = new javax.swing.JTextField();
        ing_u3 = new javax.swing.JTextField();
        ing_u4 = new javax.swing.JTextField();
        ing_u5 = new javax.swing.JTextField();
        ing_u6 = new javax.swing.JTextField();
        ing_u7 = new javax.swing.JTextField();
        ing_u8 = new javax.swing.JTextField();
        ing_t1 = new javax.swing.JLabel();
        ing_t2 = new javax.swing.JLabel();
        ing_t3 = new javax.swing.JLabel();
        ing_t4 = new javax.swing.JLabel();
        ing_t5 = new javax.swing.JLabel();
        ing_t6 = new javax.swing.JLabel();
        ing_t7 = new javax.swing.JLabel();
        ing_t8 = new javax.swing.JLabel();
        set_meal = new javax.swing.JButton();
        del_meal = new javax.swing.JButton();
        ings = new javax.swing.JPanel();
        ing_c = new javax.swing.JComboBox();
        ing_t = new javax.swing.JLabel();
        ing_u_t = new javax.swing.JLabel();
        ing_u = new javax.swing.JComboBox();
        set_ings = new javax.swing.JButton();
        del_ings = new javax.swing.JButton();
        shop = new javax.swing.JPanel();
        from_t = new javax.swing.JLabel();
        year_f = new javax.swing.JComboBox();
        month_f = new javax.swing.JComboBox();
        day_f = new javax.swing.JComboBox();
        to_t = new javax.swing.JLabel();
        year_t = new javax.swing.JComboBox();
        month_t = new javax.swing.JComboBox();
        day_t = new javax.swing.JComboBox();
        list_shop = new javax.swing.JButton();
        list_t = new javax.swing.JLabel();
        list_f = new javax.swing.JScrollPane();
        list_text = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(320, 460));
        setName("Menu"); // NOI18N
        setResizable(false);

        year.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        year.setToolTipText("");
        year.setMinimumSize(new java.awt.Dimension(64, 20));
        year.setPreferredSize(new java.awt.Dimension(64, 20));
        year.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                yearPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        month.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        month.setMinimumSize(new java.awt.Dimension(64, 20));
        month.setPreferredSize(new java.awt.Dimension(100, 20));
        month.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                monthPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        day.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        day.setMinimumSize(new java.awt.Dimension(64, 20));
        day.setPreferredSize(new java.awt.Dimension(50, 20));
        day.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                dayPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        date_t.setText("Dátum");

        appe_t.setText("Előétel");

        appe.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        main_t.setText("Főétel");

        main.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        dres_t.setText("Köret");

        dres.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        dess_t.setText("Desszert");

        dess.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        set_menu.setText("Mentés");
        set_menu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                set_menuMouseClicked(evt);
            }
        });

        del_menu.setText("Törlés");
        del_menu.setMaximumSize(new java.awt.Dimension(69, 23));
        del_menu.setMinimumSize(new java.awt.Dimension(69, 23));
        del_menu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                del_menuMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout schedLayout = new javax.swing.GroupLayout(sched);
        sched.setLayout(schedLayout);
        schedLayout.setHorizontalGroup(
            schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, schedLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(dess, javax.swing.GroupLayout.Alignment.LEADING, 0, 288, Short.MAX_VALUE)
                    .addComponent(dres, javax.swing.GroupLayout.Alignment.LEADING, 0, 288, Short.MAX_VALUE)
                    .addComponent(main, javax.swing.GroupLayout.Alignment.LEADING, 0, 288, Short.MAX_VALUE)
                    .addComponent(appe, javax.swing.GroupLayout.Alignment.LEADING, 0, 288, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(date_t)
                        .addComponent(appe_t)
                        .addComponent(main_t)
                        .addComponent(dres_t)
                        .addComponent(dess_t)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, schedLayout.createSequentialGroup()
                            .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(month, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(day, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, schedLayout.createSequentialGroup()
                        .addGap(17, 17, 17)
                        .addComponent(set_menu, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(del_menu, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        schedLayout.setVerticalGroup(
            schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(schedLayout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(date_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(month, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(day, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(appe_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(appe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(main_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(main, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(dres_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dres, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(dess_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dess, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(schedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(del_menu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(set_menu))
                .addContainerGap(113, Short.MAX_VALUE))
        );

        main_int.addTab("Beosztás", sched);
        sched.getAccessibleContext().setAccessibleName("sched");

        course.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        course.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                coursePopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        course_t.setText("Fogás");

        meal.setEditable(true);
        meal.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        meal.setSelectedItem("");
        meal.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                mealPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                mealPopupMenuWillBecomeVisible(evt);
            }
        });

        meal_t.setText("Menü");

        ings_t.setText("Hozzávalók");

        ing1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing1PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing2.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing2PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing3.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing3PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing4.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing4PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing5.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing5PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing6.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing6PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing7.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing7PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing8.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing8.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing8PopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        ing_u1.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u2.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u3.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u4.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u5.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u6.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u7.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_u8.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        ing_t1.setText("db");

        ing_t2.setText("db");

        ing_t3.setText("db");

        ing_t4.setText("db");

        ing_t5.setText("db");

        ing_t6.setText("db");

        ing_t7.setText("db");

        ing_t8.setText("db");

        set_meal.setText("Mentés");
        set_meal.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                set_mealMouseClicked(evt);
            }
        });

        del_meal.setText("Törlés");
        del_meal.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                del_mealMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout mealsLayout = new javax.swing.GroupLayout(meals);
        meals.setLayout(mealsLayout);
        mealsLayout.setHorizontalGroup(
            mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mealsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(meal_t)
                    .addComponent(ings_t)
                    .addGroup(mealsLayout.createSequentialGroup()
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(course_t)
                            .addComponent(course, 0, 120, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(set_meal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(del_meal))
                    .addGroup(mealsLayout.createSequentialGroup()
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ing8, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing7, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing6, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing5, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing4, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ing1, 0, 190, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t2))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t3))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u4, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t4))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u5, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t5))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u6, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t6))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u7, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t7))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u8, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t8))
                            .addGroup(mealsLayout.createSequentialGroup()
                                .addComponent(ing_u1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ing_t1))))
                    .addComponent(meal, 0, 276, Short.MAX_VALUE))
                .addContainerGap(22, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        mealsLayout.setVerticalGroup(
            mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mealsLayout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addComponent(course_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(course, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(del_meal)
                    .addComponent(set_meal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(meal_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(meal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(ings_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(mealsLayout.createSequentialGroup()
                        .addComponent(ing1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ing8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(mealsLayout.createSequentialGroup()
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_t1)
                            .addComponent(ing_u1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_t2)
                            .addComponent(ing_u2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_t3)
                            .addComponent(ing_u3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_u4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ing_t4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_u5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ing_t5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_u6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ing_t6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_u7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ing_t7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(mealsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ing_u8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ing_t8))))
                .addContainerGap(65, Short.MAX_VALUE))
        );

        main_int.addTab("Menük", meals);
        meals.getAccessibleContext().setAccessibleName("meals");

        ing_c.setEditable(true);
        ing_c.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        ing_c.setSelectedItem("");
        ing_c.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                ing_cPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                ing_cPopupMenuWillBecomeVisible(evt);
            }
        });

        ing_t.setText("Hozzávaló");

        ing_u_t.setText("Egység");

        ing_u.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        set_ings.setText("Mentés");
        set_ings.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                set_ingsMouseClicked(evt);
            }
        });

        del_ings.setText("Törlés");
        del_ings.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                del_ingsMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout ingsLayout = new javax.swing.GroupLayout(ings);
        ings.setLayout(ingsLayout);
        ingsLayout.setHorizontalGroup(
            ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ingsLayout.createSequentialGroup()
                .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(ingsLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(ingsLayout.createSequentialGroup()
                                .addComponent(ing_t)
                                .addGap(165, 165, 165))
                            .addGroup(ingsLayout.createSequentialGroup()
                                .addComponent(ing_c, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGap(18, 18, 18)))
                        .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ing_u_t)
                            .addComponent(ing_u, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(8, 8, 8))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, ingsLayout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(set_ings, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(del_ings, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(19, 19, 19))
        );
        ingsLayout.setVerticalGroup(
            ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ingsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ing_t)
                    .addComponent(ing_u_t))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ing_c, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ing_u, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(ingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(set_ings)
                    .addComponent(del_ings))
                .addContainerGap(314, Short.MAX_VALUE))
        );

        main_int.addTab("Hozzávalók", ings);

        from_t.setText("Dátumtól");

        year_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        year_f.setToolTipText("");
        year_f.setMinimumSize(new java.awt.Dimension(64, 20));
        year_f.setPreferredSize(new java.awt.Dimension(64, 20));

        month_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        month_f.setMinimumSize(new java.awt.Dimension(64, 20));
        month_f.setPreferredSize(new java.awt.Dimension(100, 20));

        day_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        day_f.setMinimumSize(new java.awt.Dimension(64, 20));
        day_f.setPreferredSize(new java.awt.Dimension(50, 20));

        to_t.setText("Dátumig");

        year_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        year_t.setToolTipText("");
        year_t.setMinimumSize(new java.awt.Dimension(64, 20));
        year_t.setPreferredSize(new java.awt.Dimension(64, 20));

        month_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        month_t.setMinimumSize(new java.awt.Dimension(64, 20));
        month_t.setPreferredSize(new java.awt.Dimension(100, 20));

        day_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1" }));
        day_t.setMinimumSize(new java.awt.Dimension(64, 20));
        day_t.setPreferredSize(new java.awt.Dimension(50, 20));

        list_shop.setText("Listáz");

        list_t.setText("Vásárló lista");

        list_text.setColumns(20);
        list_text.setRows(5);
        list_f.setViewportView(list_text);

        javax.swing.GroupLayout shopLayout = new javax.swing.GroupLayout(shop);
        shop.setLayout(shopLayout);
        shopLayout.setHorizontalGroup(
            shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(shopLayout.createSequentialGroup()
                .addGroup(shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(shopLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(from_t)
                            .addComponent(to_t)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, shopLayout.createSequentialGroup()
                                .addGroup(shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, shopLayout.createSequentialGroup()
                                        .addComponent(year_t, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                                        .addComponent(month_t, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(day_t, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(shopLayout.createSequentialGroup()
                                        .addComponent(year_f, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                                        .addComponent(month_f, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(day_f, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(8, 8, 8))))
                    .addGroup(shopLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(list_t))
                    .addGroup(shopLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(list_f, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE))
                    .addGroup(shopLayout.createSequentialGroup()
                        .addGap(78, 78, 78)
                        .addComponent(list_shop, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        shopLayout.setVerticalGroup(
            shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(shopLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(from_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(year_f, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(day_f, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(month_f, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(to_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(shopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(year_t, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(day_t, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(month_t, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(list_shop)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(list_t)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(list_f, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE)
                .addContainerGap())
        );

        main_int.addTab("Vásárlás", shop);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(main_int, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(main_int, javax.swing.GroupLayout.DEFAULT_SIZE, 434, Short.MAX_VALUE)
                .addContainerGap())
        );

        main_int.getAccessibleContext().setAccessibleName("tab");

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void del_menuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_del_menuMouseClicked
    try {
            Statement stmt = conn.createStatement();
            String date = year.getSelectedItem().toString()+month.getSelectedItem().toString()+day.getSelectedItem().toString();
            
            stmt.executeUpdate("DELETE FROM sche WHERE date="+date+"");

        } catch (Exception e) {
            System.err.println("Got an exception: del_menuMouseClicked");
            System.err.println(e.getMessage());
        }
    appe.setSelectedItem("");
    main.setSelectedItem("");
    dres.setSelectedItem("");
    dess.setSelectedItem("");
    initScheMeals();
}//GEN-LAST:event_del_menuMouseClicked

private void set_menuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_set_menuMouseClicked
    String date = year.getSelectedItem().toString()+month.getSelectedItem().toString()+day.getSelectedItem().toString();
    
    String db_appe=appe.getSelectedItem().toString();
    String db_main=main.getSelectedItem().toString();
    String db_dres=dres.getSelectedItem().toString();
    String db_dess=dess.getSelectedItem().toString();
    
    try {
        Statement stmt = conn.createStatement();
        ResultSet rs;
        
        rs = stmt.executeQuery("SELECT * FROM sche WHERE date="+date);
        if(!rs.last()) stmt.executeUpdate("INSERT INTO sche VALUES ("+date+",\""+db_appe+"\", \""+db_main+"\", \""+db_dres+"\", \""+db_dess+"\")");
        else stmt.executeUpdate("UPDATE sche SET appe=\""+db_appe+"\", main=\""+db_main+"\", dres=\""+db_dres+"\", dess=\""+db_dess+"\" WHERE date="+date);

    } catch (Exception e) {
        System.err.println("Got an exception: set_menuMouseClicked");
        System.err.println(e.getMessage());
    }
}//GEN-LAST:event_set_menuMouseClicked

private void set_ingsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_set_ingsMouseClicked
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            String db_ings=ing_c.getSelectedItem().toString();
            String db_unit=ing_u.getSelectedItem().toString();
                        
            rs = stmt.executeQuery("SELECT * FROM ings WHERE name=\""+db_ings+"\"");
            if(!rs.last()) stmt.executeUpdate("INSERT INTO ings VALUES (\""+db_ings+"\",\""+db_unit+"\")");
            else stmt.executeUpdate("UPDATE ings SET unit=\""+db_unit+"\" WHERE name=\""+db_ings+"\"");

        } catch (Exception e) {
            System.err.println("Got an exception: set_ingsMouseClicked");
            System.err.println(e.getMessage());
        }
    initMealIngs();
}//GEN-LAST:event_set_ingsMouseClicked

private void del_ingsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_del_ingsMouseClicked
    try {
            Statement stmt = conn.createStatement();
            String db_ings=ing_c.getSelectedItem().toString();
            
            stmt.executeUpdate("DELETE FROM ings WHERE name=\""+db_ings+"\"");

        } catch (Exception e) {
            System.err.println("Got an exception: del_ingsMouseClicked");
            System.err.println(e.getMessage());
        }
    ing_c.setSelectedItem("");
    initMealIngs();
}//GEN-LAST:event_del_ingsMouseClicked

private void ing_cPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing_cPopupMenuWillBecomeVisible
    initIngsCombo(ing_c);
}//GEN-LAST:event_ing_cPopupMenuWillBecomeVisible

private void ing_cPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing_cPopupMenuWillBecomeInvisible
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            String db_ings=ing_c.getSelectedItem().toString();
                        
            rs = stmt.executeQuery("SELECT unit FROM ings WHERE name=\""+db_ings+"\"");
            rs.absolute(1);
            ing_u.setSelectedItem(rs.getString("unit"));

        } catch (Exception e) {
            System.err.println("Got an exception: ing_cPopupMenuWillBecomeInvisible");
            System.err.println(e.getMessage());
        }
}//GEN-LAST:event_ing_cPopupMenuWillBecomeInvisible

private void ing1PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing1PopupMenuWillBecomeInvisible
    initIngsUnit(ing1,ing_t1);
}//GEN-LAST:event_ing1PopupMenuWillBecomeInvisible

private void ing2PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing2PopupMenuWillBecomeInvisible
    initIngsUnit(ing2,ing_t2);
}//GEN-LAST:event_ing2PopupMenuWillBecomeInvisible

private void ing3PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing3PopupMenuWillBecomeInvisible
    initIngsUnit(ing3,ing_t3);
}//GEN-LAST:event_ing3PopupMenuWillBecomeInvisible

private void ing4PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing4PopupMenuWillBecomeInvisible
    initIngsUnit(ing4,ing_t4);
}//GEN-LAST:event_ing4PopupMenuWillBecomeInvisible

private void ing5PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing5PopupMenuWillBecomeInvisible
    initIngsUnit(ing5,ing_t5);
}//GEN-LAST:event_ing5PopupMenuWillBecomeInvisible

private void ing6PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing6PopupMenuWillBecomeInvisible
    initIngsUnit(ing6,ing_t6);
}//GEN-LAST:event_ing6PopupMenuWillBecomeInvisible

private void ing7PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing7PopupMenuWillBecomeInvisible
    initIngsUnit(ing7,ing_t7);
}//GEN-LAST:event_ing7PopupMenuWillBecomeInvisible

private void ing8PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ing8PopupMenuWillBecomeInvisible
    initIngsUnit(ing8,ing_t8);
}//GEN-LAST:event_ing8PopupMenuWillBecomeInvisible

private void mealPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_mealPopupMenuWillBecomeVisible
    initMealCombo();
}//GEN-LAST:event_mealPopupMenuWillBecomeVisible

private void set_mealMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_set_mealMouseClicked
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            String db_cour=checkCourse();
            String db_meal=meal.getSelectedItem().toString();
            checkAllIngs();
            
            rs = stmt.executeQuery("SELECT * FROM meal WHERE name=\""+db_meal+"\"");
            if(!rs.last()) stmt.executeUpdate("INSERT INTO meal VALUES (\""+db_meal+"\",\""+db_cour+"\","+textFl(ing_u1)+",\""+textC(ing1)+"\","+textFl(ing_u2)+",\""+textC(ing2)+"\","+textFl(ing_u3)+",\""+textC(ing3)+"\","+textFl(ing_u4)+",\""+textC(ing4)+"\","+textFl(ing_u5)+",\""+textC(ing5)+"\","+textFl(ing_u6)+",\""+textC(ing6)+"\","+textFl(ing_u7)+",\""+textC(ing7)+"\","+textFl(ing_u8)+",\""+textC(ing8)+"\")");
            else stmt.executeUpdate("UPDATE meal SET type=\""+db_cour+"\", cnt1="+textFl(ing_u1)+", ing1=\""+textC(ing1)+"\", cnt2="+textFl(ing_u2)+", ing2=\""+textC(ing2)+"\", cnt3="+textFl(ing_u3)+", ing3=\""+textC(ing3)+"\", cnt4="+textFl(ing_u4)+", ing4=\""+textC(ing4)+"\", cnt5="+textFl(ing_u5)+", ing5=\""+textC(ing5)+"\", cnt6="+textFl(ing_u6)+", ing6=\""+textC(ing6)+"\", cnt7="+textFl(ing_u7)+", ing7=\""+textC(ing7)+"\", cnt8="+textFl(ing_u8)+", ing8=\""+textC(ing8)+"\" WHERE name=\""+db_meal+"\"");

        } catch (Exception e) {
            System.err.println("Got an exception: set_mealMouseClicked");
            System.err.println(e.getMessage());
        }
    initMealIngs();
    initScheMeals();
}//GEN-LAST:event_set_mealMouseClicked

private void del_mealMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_del_mealMouseClicked
    try {
            Statement stmt = conn.createStatement();
            String db_meal=meal.getSelectedItem().toString();
            
            stmt.executeUpdate("DELETE FROM meal WHERE name=\""+db_meal+"\"");

        } catch (Exception e) {
            System.err.println("Got an exception: del_mealMouseClicked");
            System.err.println(e.getMessage());
        }
    meal.setSelectedItem("");
    initScheMeals();
    clearAllMeal();
}//GEN-LAST:event_del_mealMouseClicked

private void mealPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_mealPopupMenuWillBecomeInvisible
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            setAllUnitDef();
            String db_meal=meal.getSelectedItem().toString();
            
            if(db_meal.isEmpty()) clearAllMeal();
            else{         
                rs = stmt.executeQuery("SELECT * FROM meal WHERE name=\""+db_meal+"\"");
                rs.absolute(1);
                ing_u1.setText(rs.getString("cnt1"));
                ing1.setSelectedItem(rs.getString("ing1"));
                ing_u2.setText(rs.getString("cnt2"));
                ing2.setSelectedItem(rs.getString("ing2"));
                ing_u3.setText(rs.getString("cnt3"));
                ing3.setSelectedItem(rs.getString("ing3"));
                ing_u4.setText(rs.getString("cnt4"));
                ing4.setSelectedItem(rs.getString("ing4"));
                ing_u5.setText(rs.getString("cnt5"));
                ing5.setSelectedItem(rs.getString("ing5"));
                ing_u6.setText(rs.getString("cnt6"));
                ing6.setSelectedItem(rs.getString("ing6"));
                ing_u7.setText(rs.getString("cnt7"));
                ing7.setSelectedItem(rs.getString("ing7"));
                ing_u8.setText(rs.getString("cnt8"));
                ing8.setSelectedItem(rs.getString("ing8"));

                setAllUnit();
            }
        } catch (Exception e) {
            System.err.println("Got an exception: mealPopupMenuWillBecomeInvisible");
            System.err.println(e.getMessage());
        }
}//GEN-LAST:event_mealPopupMenuWillBecomeInvisible

private void yearPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_yearPopupMenuWillBecomeInvisible
    checkDate();
}//GEN-LAST:event_yearPopupMenuWillBecomeInvisible

private void monthPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_monthPopupMenuWillBecomeInvisible
    checkDate();
}//GEN-LAST:event_monthPopupMenuWillBecomeInvisible

private void dayPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_dayPopupMenuWillBecomeInvisible
    checkDate();
}//GEN-LAST:event_dayPopupMenuWillBecomeInvisible

private void coursePopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_coursePopupMenuWillBecomeInvisible
    meal.setSelectedItem("");
    clearAllMeal();
}//GEN-LAST:event_coursePopupMenuWillBecomeInvisible
private void initDBConn(){     
    String driver ="com.mysql.jdbc.Driver";
    String url = "jdbc:mysql://localhost:3306/menu";
    String user = "root";
    String pass = "SQL4Life";
    try {
        Class.forName(driver); 
        conn = DriverManager.getConnection(url, user, pass);
        } catch (Exception e) {
            System.err.println("Got an exception: initDBConn");
            System.err.println(e.getMessage());
        }
}

private void initScheCombo(){    
    initDateCombos();
    
    appe.setSelectedItem("");
    main.setSelectedItem("");
    dres.setSelectedItem("");
    dess.setSelectedItem("");
    
    initScheMeals();
    checkDate();
}

private void initScheMeals(){
    ArrayList list = new ArrayList();
    String appe_sel=appe.getSelectedItem().toString();
    String main_sel=main.getSelectedItem().toString();
    String dres_sel=dres.getSelectedItem().toString();
    String dess_sel=dess.getSelectedItem().toString();
    
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            
            list.add("");
            rs = stmt.executeQuery("SELECT name FROM meal WHERE type=\"appe\" ORDER BY name ASC");
            while(rs.next()){list.add(rs.getString("name"));}
            appe.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
            
            list.clear();
            list.add("");
            rs = stmt.executeQuery("SELECT name FROM meal WHERE type=\"main\" ORDER BY name ASC");
            while(rs.next()){list.add(rs.getString("name"));}
            main.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
            
            list.clear();
            list.add("");
            rs = stmt.executeQuery("SELECT name FROM meal WHERE type=\"dres\" ORDER BY name ASC");
            while(rs.next()){list.add(rs.getString("name"));}
            dres.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
            
            list.clear();
            list.add("");
            rs = stmt.executeQuery("SELECT name FROM meal WHERE type=\"dess\" ORDER BY name ASC");
            while(rs.next()){list.add(rs.getString("name"));}
            dess.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
            
        } catch (Exception e) {
            System.err.println("Got an exception: initScheMeals");
            System.err.println(e.getMessage());
        }
    
    appe.setSelectedItem(appe_sel);
    main.setSelectedItem(main_sel);
    dres.setSelectedItem(dres_sel);
    dess.setSelectedItem(dess_sel);
}

private void initMealCombo(){
    
    ArrayList list = new ArrayList();
    list.add("");
    String meal_sel=meal.getSelectedItem().toString();
    String type=checkCourse();
    
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            
            rs = stmt.executeQuery("SELECT name FROM meal WHERE type=\""+type+"\" ORDER BY name ASC");
            
            while(rs.next()){
                list.add(rs.getString("name"));
            }
        } catch (Exception e) {
            System.err.println("Got an exception: initMealCombo");
            System.err.println(e.getMessage());
        }
    
    meal.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
    meal.setSelectedItem(meal_sel);
}

private void checkDate(){
    String date = year.getSelectedItem().toString()+month.getSelectedItem().toString()+day.getSelectedItem().toString();
    
    try {
        Statement stmt = conn.createStatement();
        ResultSet rs;
        String db_appe="";
        String db_main="";
        String db_dres="";
        String db_dess="";

        rs = stmt.executeQuery("SELECT * FROM sche WHERE date="+date);

        while (rs.next()){

        db_appe = rs.getString("appe");
        db_main = rs.getString("main");
        db_dres = rs.getString("dres");
        db_dess = rs.getString("dess");
        }

        appe.setSelectedItem(db_appe);
        main.setSelectedItem(db_main);
        dres.setSelectedItem(db_dres);
        dess.setSelectedItem(db_dess);

    } catch (Exception e) {
        System.err.println("Got an exception: checkDate");
        System.err.println(e.getMessage());
    }
}

private String checkCourse(){
    String t = "";
    String type_t=course.getSelectedItem().toString();
    
    if (type_t=="Előétel") t="appe";
    else if (type_t=="Főétel") t="main";
    else if (type_t=="Köret") t="dres";
    else if (type_t=="Desszert") t="dess";
    
    return t;
}

private void checkIngs(JComboBox c_co, JTextField c_in){
    String co=textC(c_co);
    String in=textT(c_in);
    
    if(in.isEmpty() || co.isEmpty()) {c_co.setSelectedItem(""); c_in.setText("");}
}

private void checkAllIngs(){
    checkIngs(ing1,ing_u1);
    checkIngs(ing2,ing_u2);
    checkIngs(ing3,ing_u3);
    checkIngs(ing4,ing_u4);
    checkIngs(ing5,ing_u5);
    checkIngs(ing6,ing_u6);
    checkIngs(ing7,ing_u7);
    checkIngs(ing8,ing_u8);
}

private String textC(JComboBox c){
    String t=c.getSelectedItem().toString();
    return t;
}

private String textT(JTextField c){
    String t=c.getText().toString();  
    return t;
}

private String textFl(JTextField c){
    String t=c.getText().toString();
    if(t.isEmpty()) t="NULL";
    return t;
}

private void initMealIngs(){
    initIngsCombo(ing1);
    initIngsCombo(ing2);
    initIngsCombo(ing3);
    initIngsCombo(ing4);
    initIngsCombo(ing5);
    initIngsCombo(ing6);
    initIngsCombo(ing7);
    initIngsCombo(ing8);
}

private void initIngsCombo(JComboBox ing){
    
    ArrayList list = new ArrayList();
    list.add("");
    String ing_sel=ing.getSelectedItem().toString();
    
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            
            rs = stmt.executeQuery("SELECT name FROM ings ORDER BY name ASC");
            
            while(rs.next()){
                list.add(rs.getString("name"));
            }
        } catch (Exception e) {
            System.err.println("Got an exception: initIngsCombo");
            System.err.println(e.getMessage());
        }
    
    ing.setModel(new javax.swing.DefaultComboBoxModel(list.toArray()));
    ing.setSelectedItem(ing_sel);
}

private void initIngsUnit(JComboBox ing, JLabel ing_t){
    try {
            Statement stmt = conn.createStatement();
            ResultSet rs;
            String db_ings=ing.getSelectedItem().toString();
                        
            rs = stmt.executeQuery("SELECT unit FROM ings WHERE name=\""+db_ings+"\"");
            rs.absolute(1);
            ing_t.setText(rs.getString("unit"));

        } catch (Exception e) {
            System.err.println("Got an exception: initIngsUnit");
            System.err.println(e.getMessage());
        }
}

private void initDateCombos(){
    year.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2012", "2013", "2014", "2015", "2016" }));
    month.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
    day.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
    year.setSelectedItem("2012");
    month.setSelectedItem("03");
    day.setSelectedItem("05");
    
    year_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2012", "2013", "2014", "2015", "2016" }));
    month_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
    day_f.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
    year_f.setSelectedItem("2012");
    month_f.setSelectedItem("02");
    day_f.setSelectedItem("05");
    
    year_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2012", "2013", "2014", "2015", "2016" }));
    month_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
    day_t.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
    year_t.setSelectedItem("2012");
    month_t.setSelectedItem("02");
    day_t.setSelectedItem("12");
}

private void setAllUnit(){
    initIngsUnit(ing1,ing_t1);
    initIngsUnit(ing2,ing_t2);
    initIngsUnit(ing3,ing_t3);
    initIngsUnit(ing4,ing_t4);
    initIngsUnit(ing5,ing_t5);
    initIngsUnit(ing6,ing_t6);
    initIngsUnit(ing7,ing_t7);
    initIngsUnit(ing8,ing_t8);
}

private void setAllUnitDef(){
    ing_t1.setText("db");
    ing_t2.setText("db");
    ing_t3.setText("db");
    ing_t4.setText("db");
    ing_t5.setText("db");
    ing_t6.setText("db");
    ing_t7.setText("db");
    ing_t8.setText("db");
}

private void clearAllMeal(){
    ing1.setSelectedItem("");
    ing2.setSelectedItem("");
    ing3.setSelectedItem("");
    ing4.setSelectedItem("");
    ing5.setSelectedItem("");
    ing6.setSelectedItem("");
    ing7.setSelectedItem("");
    ing8.setSelectedItem("");
    ing_u1.setText("");
    ing_u2.setText("");
    ing_u3.setText("");
    ing_u4.setText("");
    ing_u5.setText("");
    ing_u6.setText("");
    ing_u7.setText("");
    ing_u8.setText("");
}
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        /*try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(base_frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(base_frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(base_frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(base_frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }*/
        //</editor-fold>
                
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new base_frame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox appe;
    private javax.swing.JLabel appe_t;
    private javax.swing.JComboBox course;
    private javax.swing.JLabel course_t;
    private javax.swing.JLabel date_t;
    private javax.swing.JComboBox day;
    private javax.swing.JComboBox day_f;
    private javax.swing.JComboBox day_t;
    private javax.swing.JButton del_ings;
    private javax.swing.JButton del_meal;
    private javax.swing.JButton del_menu;
    private javax.swing.JComboBox dess;
    private javax.swing.JLabel dess_t;
    private javax.swing.JComboBox dres;
    private javax.swing.JLabel dres_t;
    private javax.swing.JLabel from_t;
    private javax.swing.JComboBox ing1;
    private javax.swing.JComboBox ing2;
    private javax.swing.JComboBox ing3;
    private javax.swing.JComboBox ing4;
    private javax.swing.JComboBox ing5;
    private javax.swing.JComboBox ing6;
    private javax.swing.JComboBox ing7;
    private javax.swing.JComboBox ing8;
    private javax.swing.JComboBox ing_c;
    private javax.swing.JLabel ing_t;
    private javax.swing.JLabel ing_t1;
    private javax.swing.JLabel ing_t2;
    private javax.swing.JLabel ing_t3;
    private javax.swing.JLabel ing_t4;
    private javax.swing.JLabel ing_t5;
    private javax.swing.JLabel ing_t6;
    private javax.swing.JLabel ing_t7;
    private javax.swing.JLabel ing_t8;
    private javax.swing.JComboBox ing_u;
    private javax.swing.JTextField ing_u1;
    private javax.swing.JTextField ing_u2;
    private javax.swing.JTextField ing_u3;
    private javax.swing.JTextField ing_u4;
    private javax.swing.JTextField ing_u5;
    private javax.swing.JTextField ing_u6;
    private javax.swing.JTextField ing_u7;
    private javax.swing.JTextField ing_u8;
    private javax.swing.JLabel ing_u_t;
    private javax.swing.JPanel ings;
    private javax.swing.JLabel ings_t;
    private javax.swing.JScrollPane list_f;
    private javax.swing.JButton list_shop;
    private javax.swing.JLabel list_t;
    private javax.swing.JTextArea list_text;
    private javax.swing.JComboBox main;
    private javax.swing.JTabbedPane main_int;
    private javax.swing.JLabel main_t;
    private javax.swing.JComboBox meal;
    private javax.swing.JLabel meal_t;
    private javax.swing.JPanel meals;
    private javax.swing.JComboBox month;
    private javax.swing.JComboBox month_f;
    private javax.swing.JComboBox month_t;
    private javax.swing.JPanel sched;
    private javax.swing.JButton set_ings;
    private javax.swing.JButton set_meal;
    private javax.swing.JButton set_menu;
    private javax.swing.JPanel shop;
    private javax.swing.JLabel to_t;
    private javax.swing.JComboBox year;
    private javax.swing.JComboBox year_f;
    private javax.swing.JComboBox year_t;
    // End of variables declaration//GEN-END:variables
}
